const loginForm = {
  username: "admin",
  password: "admin123",
  code: "1234",
  uuid: ""
}

let mocks: MockRecord[] = [
  {
    method: "post",
    url: "/api/login",
    response: (data) => {
      let resData: responseType = {
        code: 200,
        token: "",
        msg: "",
      }
      if(data.body.username != loginForm.username){
        resData.code = 500;
        resData.msg = "用户名或密码错误"
      }else if(data.body.password != loginForm.password){
        resData.code = 500;
        resData.msg = "用户名或密码错误"
      }else {
        resData.token = "12312313132132"
      }
      return resData;
    },
  },
  {
    method: "get",
    url: "/api/getInfo",
    response(data){
      let resData: responseType = {
        "msg": "操作成功",
        "code": 200,
        "permissions": [
          "*:*:*"
        ],
        "roles": [
          "admin"
        ],
        "user": {
          "createBy": "admin",
          "createTime": "2024-07-07 17:41:52",
          "updateBy": null,
          "updateTime": null,
          "remark": "管理员",
          "params": {
            "@type": "java.util.HashMap"
          },
          "userId": 1,
          "deptId": 103,
          "userName": "admin",
          "nickName": "必哥",
          "email": "ry@163.com",
          "phonenumber": "15888888888",
          "sex": "1",
          "avatar": "",
          "password": "$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2",
          "status": "0",
          "delFlag": "0",
          "loginIp": "127.0.0.1",
          "loginDate": "2024-07-08T00:49:44.000+08:00",
          "dept": {
            "createBy": null,
            "createTime": null,
            "updateBy": null,
            "updateTime": null,
            "remark": null,
            "params": {
              "@type": "java.util.HashMap"
            },
            "deptId": 103,
            "parentId": 101,
            "ancestors": "0,100,101",
            "deptName": "研发部门",
            "orderNum": 1,
            "leader": "必哥",
            "phone": null,
            "email": null,
            "status": "0",
            "delFlag": null,
            "parentName": null,
            "children": []
          },
          "roles": [
            {
              "createBy": null,
              "createTime": null,
              "updateBy": null,
              "updateTime": null,
              "remark": null,
              "params": {
                "@type": "java.util.HashMap"
              },
              "roleId": 1,
              "roleName": "超级管理员",
              "roleKey": "admin",
              "roleSort": 1,
              "dataScope": "1",
              "menuCheckStrictly": false,
              "deptCheckStrictly": false,
              "status": "0",
              "delFlag": null,
              "flag": false,
              "menuIds": null,
              "deptIds": null,
              "permissions": null,
              "admin": true
            }
          ],
          "roleIds": null,
          "postIds": null,
          "roleId": null,
          "admin": true
        }
      }
      return resData;
    }
  },
  {
    method: "post",
    url: "/api/logout",
    response: (data) => {
      let resData: responseType = {
        code: 200,
        data: null,
        message: "",
      }

      return resData;
    },
  },
  {
    method: "get",
    url: "/api/captchaImage",
    response(data) {
      let resData: responseType = {
        captchaEnabled: true,
        code: 200,
        img: "/9j/4AAQSkZJRgABAgAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAA8AKADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6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TLEQk4uXZv+v8AIagkrM8p0Lwpa21wrrYR5B6uu4j869Vs4WWyC4xgVYh0yGM8IKvLEAuAK46lWpVlzVJNvzdykktjxb4i6VGwa/msftJhHzYcqwTvyPTr+db/AMLdRs9Z09zCnlS27BHiZ9xAxwc984P5Guq1vSxcIw2BgRggjIIqt4a0W30tyLazgt933jFGFz9cV0/WYSwvsZpuSd4u7sl1VtvuFZ810dnGMKKkFMj+6KkFcRQ4VV1f/kCX/wD17Sf+gmrYqrq//IEv/wDr2k/9BNTL4WTL4WclZf8AHlb/APXNf5VZFczFrVzFEkapEQihRkHt+NSf2/df884f++T/AI1lGtGyM41Y2R0opwrmf+Ehu/8AnnB/3yf8aX/hIrv/AJ5wf98n/Gq9tEftonUYzTDboxyQK5v/AISS8/55Qf8AfJ/xpf8AhJbz/nlB/wB8n/Gj20Q9tE6mOMIOBUwrkf8AhJ73/nlb/wDfLf40v/CUXv8Azyt/++W/xo9tEPbROvAp20HtXH/8JVff88rf/vlv8aX/AISu+/55W3/fLf40e2iHtonYqgHQVKBXFf8ACW3/APzxtv8Avlv8aX/hL9Q/5423/fLf/FUe2iHtonbCniuH/wCEw1D/AJ42v/fLf/FUv/CZaj/zxtf++W/+Ko9tEPbRO3aJXHIojt0Q8CuJ/wCEz1H/AJ42v/fDf/FUv/Ca6l/zwtP++G/+Ko9tEPbRO9UU8VwH/Cbal/zwtP8Avhv/AIql/wCE41P/AJ4Wn/fDf/FUe2iHtonoIqrq/wDyA9Q/69pP/QTXFf8ACc6n/wA8LT/vhv8A4qo7nxnqN1azW7w2oSVGRiqtkAjHHzVMq0bMUqsbM//Z",
        message: "操作成功",
        uuid: "61223c855c06414c91b5c65b5a15eccc"
      }

      return resData;
    }
  }
]

export default mocks